<%@page contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%@page import="java.util.*,org.lanqiao.entity.*"%>
<html>
<head>
<title>歌单</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/index.css"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/header.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/audio.js"></script>
</head>
<body>
	<!-- header-->
	
	<%@include file="header.jsp" %>
	<div id="wrap_show">
		<div id="top_content">
			<div id="content" >
				<p id="whereami"></p>
				<h1>智慧云</h1>
				<table class="table">
					<tr class="table_header">
						<td>歌名</td>
						<td>歌手</td>
						<td>操作</td>
					</tr>
						
						<c:forEach items="${PageInfo.list}" var="musics" >
					<tr class="row${musics.id}/2" >
						<td>${musics.title}</td>
						<td>${musics.singer}</td>
						<td><a href="#"><audio src="${musics.url}" controls="controls" preload="auto" loop="loop"></audio></a></td>
					</tr>
							
						</c:forEach>
						
					
				</table>
				
			</div>
		</div>
		
	</div>
		<div style="height:38px;text-align:center;padding-top:20px;">
                     <button class="btn btn-outline-danger btn-sm" onclick="UpAndDown('1');" type="button">
                     
                     <strong>&lt;&lt;</strong> 上一页</button>
                     <b class="ui-page-cur" style="margin-top:2.5px;">&nbsp;&nbsp;${PageInfo.pageNum}/${PageInfo.pages}&nbsp;&nbsp;</b>
                     <button class="btn btn-outline-danger btn-sm" onclick="UpAndDown('2');" type="button">下一页 <strong>&gt;&gt;</strong></button>
     </div>
		 <%@include file="footer.jsp" %> >
</body>

		<script type="text/javascript">
               function UpAndDown(IFUpAndDown)
               {
                  if(IFUpAndDown=='1')
                  {
                     window.location.href="${pageContext.request.contextPath}/entertain/findMusic.do?pageNum="+${PageInfo.prePage};
                  }
                  else
                  {
                     window.location.href="${pageContext.request.contextPath}/entertain/findMusic.do?pageNum="+${PageInfo.nextPage};
                  }
               }
            </script>


</html>